1. Field of the Invention
The present invention relates to a pulse width control method and an apparatus therefor in motor speed control, and more particularly to a pulse width control method and an apparatus therefor in motor speed control in which a microcomputer and a timer are used and it is made possible to perform pulse width modulation by making the data be set in the timer in complementary relation so as to simplify the apparatus.
2. Description of the Prior Art
Recently, the application of microcomputer has been increased for the purpose of providing high performance in motor control.
Especially, the object of control is a servo motor in an apparatus in the field, for example, of factory automation (FA), office automation (OA), or the like.
As to the motor control, on the other hand, a pulse width control method is mainly used as the main current in the viewpoint of cost reduction, responsibility, or the like, of the control circuit.
FIG. 1 is a schematic diagram showing the arrangement of a popular speed control circuit employing a DC motor including a pulse width control circuit which has been proposed by the inventors of the present invention.
A DC motor 109 is controlled by four power transistors 101 to 104. That is, upon the turning-on of the power transistors 101 to 104, the motor 109 is supplied with a positive voltage by a DC power source 100 to rotate in the forward direction. It is necessary to control the voltage to the motor to perform the motor speed control, and this is achieved by causing the power transistor 101 or 104 to be subject to pulse width modulation.
It is possible to reverse the rotational direction of the motor 109 by making the power transistors 102 and 103 conductive to thereby supply a negative voltage to the motor 109.
Reference numeral 111 designates a gate driver relating to the base drive for the power transistors 101 to 104, and 105 to 108 designate rectifiers.
The speed detection is performed by counting the pulses of an encoder 110. To this end, the pulse waveform shaping and pulse counting are performed by a pulse counting circuit 113 and the result of count is transferred to a control circuit 112 through a data bus 114. The control circuit 112 includes a microcomputer to perform the speed control by using a software.
FIG. 2 is a block diagram of a control circuit which has been proposed by the inventors of the present invention.
A microcomputer 210 is constituted by a central processing unit (CPU) 200, a random access memory (RAM) 201, and a read only memory (ROM) 202, and serves to perform speed control calculation. Reference numeral 203 designates a digital-to-analog (D/A) converter, 204 a triangular wave generating circuit, 205 a comparator, 206 an input/output (I/O) port, and 207 and 208 AND circuits.
FIG. 3 is an operation explanatory diagram for the circuit of FIG. 2 and the operation waveform signals (a) to (g) of FIG. 3 are those detected at the portions (a) to (g) of FIG. 2.
The speed command data as shown in FIG. 2 is in the form of digital data and taken into the microcomputer 210 through the I/O port 206. On the other hand, the speed feedback data as shown in FIG. 2 is generated by the pulse measuring circuit 113 of FIG. 1. The microcomputer 210 performs the velocity control calculation on the basis of the speed command data and the speed feedback data to obtain the duty factor of the pulse width modulation and the thus computed data of duty factor is converted into an analog signal by the D/A converter 203. The signal (b) of FIG. 3 shows the analog duty factor signal.
The triangular wave generating circuit 204 generates a carrier wave signal (a) as shown in FIG. 3. The comparator 205 compares the signals (a) and (b) to produce a pulse width modulation fundamental signal (c) as shown in FIG. 3.
The gate signal for the power transistors 101 to 104 of FIG. 1 is formed, as shown in FIG. 1, by the signals (d) and (e) which are the output signals of the I/O port 206, so that the power transistors 101 and 104 are made conductive based on the signal (d) to drive the motor 109 to rotate in the forward direction, while the power transistors 102 and 103 are made conductive based on the signal (e) to drive the motor 109 to rotate in the reverse direction.
The output signal (c) of the comparator 205 is ANDed by the AND circuits 207 and 208 with the above-mentioned signals (d) and (e) for determining the direction of motor rotation to produce pulse width modulation signals (f) and (g) respectively to thereby perform the voltage control for the motor 109.
However, in such a control circuit as shown in FIG. 2, as described above, digital and analog processings are mixed and the pulse width modulation is generated by the analog processing, resulting in a drawback of temperature drifting. Further, in the microcomputer, the computed data is in the form of a digital and a D/A converter is required, resulting in a drawback that the interface becomes complicated.